var mongoose = require('mongoose');
mongoose.connect('mongodb://127.0.0.1:27017/webIM');

var GiftListModel = mongoose.model('GiftList', {
    gid: String,
    name: String,
    price: Number,
    price_label: String,
    img: {
        effect: String,
        ext: String,
        icon: String
    }
});

var gift = new GiftListModel({
    gid: '9',
    name: '葵花宝典',
    price: 999,
    price_label: '999元',
    img: {
        effect: 'http://cdn.res.cjatech.com/upload/test.cjatech.com/img/636391708319580794.png',
        ext: 'http://cdn.res.cjatech.com/upload/test.cjatech.com/img/636391708319580794.png',
        icon: 'http://cdn.res.cjatech.com/upload/test.cjatech.com/img/636391708319580794.png',
    }
});
gift.save(function (err) {
    if (err) {
        console.log('save gift fail');
    }
})
/*

var gift = new GiftListModel({
    gid: '5',
    name: '威慑天下',
    price: 300,
    price_label: '300元',
    img: {
        effect: 'http://cdn.res.cjatech.com/upload/test.cjatech.com/img/636391717110298945.jpgg',
        ext: 'http://cdn.res.cjatech.com/upload/test.cjatech.com/img/636391717110298945.jpg',
        icon: 'http://cdn.res.cjatech.com/upload/test.cjatech.com/img/636391717110298945.jpg',
    }
});
gift.save(function (err) {
    if (err) {
        console.log('save gift fail');
    }
})

var gift = new GiftListModel({
    gid: '6',
    name: '酒池肉林',
    price: 200,
    price_label: '350元',
    img: {
        effect: 'http://cdn.res.cjatech.com/upload/test.cjatech.com/img/636391718449365933.jpg',
        ext: 'http://cdn.res.cjatech.com/upload/test.cjatech.com/img/636391718449365933.jpg',
        icon: 'http://cdn.res.cjatech.com/upload/test.cjatech.com/img/636391718449365933.jpg',
    }
});
gift.save(function (err) {
    if (err) {
        console.log('save gift fail');
    }
})
var gift = new GiftListModel({
    gid: '7',
    name: '皮皮虾',
    price: 400,
    price_label: '400元',
    img: {
        effect: 'https://i.h2.pdim.gs/2501073df4d559bc0cf1a7092464532c.png',
        ext: 'https://i.h2.pdim.gs/2501073df4d559bc0cf1a7092464532c.png',
        icon: 'https://i.h2.pdim.gs/2501073df4d559bc0cf1a7092464532c.png',
    }
});
gift.save(function (err) {
    if (err) {
        console.log('save gift fail');
    }
})
var gift = new GiftListModel({
    gid: '8',
    name: '你忙吧，我吃柠檬',
    price: 500,
    price_label: '500元',
    img: {
        effect: 'https://i.h2.pdim.gs/9e8775ff16d241e4c038b289c4738468.png',
        ext: 'https://i.h2.pdim.gs/9e8775ff16d241e4c038b289c4738468.png',
        icon: 'https://i.h2.pdim.gs/9e8775ff16d241e4c038b289c4738468.png',
    }
});
gift.save(function (err) {
    if (err) {
        console.log('save gift fail');
    }
})
*/


/*
 *  {
 gid: '1',
 free: 1,
 name: '爱心',
 desc: '爱心 加油',
 gprice: 10,
 price: '10元',
 img: {
 effect: 'https://i.h2.pdim.gs/39bfbcfc5a6a5dd3d6115ed8127f7c37.png',
 ext: 'https://i.h2.pdim.gs/39bfbcfc5a6a5dd3d6115ed8127f7c37.png',
 icon: 'https://i.h2.pdim.gs/39bfbcfc5a6a5dd3d6115ed8127f7c37.png',
 }
 },
 {
 gid: '2',
 free: 1,
 name: '大礼包',
 desc: '一波肥',
 gprice: 10,
 price: '10元',
 img: {
 effect: 'https://i.h2.pdim.gs/5dc41b4e9ce364c5c307476b756096a2.png',
 ext: 'https://i.h2.pdim.gs/5dc41b4e9ce364c5c307476b756096a2.png',
 icon: 'https://i.h2.pdim.gs/5dc41b4e9ce364c5c307476b756096a2.png',
 }
 },
 {
 gid: '3',
 free: 1,
 name: '快递员',
 desc: '专业送快递多年',
 gprice: 10,
 price: '10元',
 img: {
 effect: 'https://i.h2.pdim.gs/3b66f396c3cab2d38fe2b925650eae10.png',
 ext: 'https://i.h2.pdim.gs/3b66f396c3cab2d38fe2b925650eae10.png',
 icon: 'https://i.h2.pdim.gs/3b66f396c3cab2d38fe2b925650eae10.png',
 }
 }
 * */



/*
*
* */